Scripting Languages/ Binding Scripts to GUI Objects

Binding Scripts to GUI Objects

 

Let's assume you have to create animations so that there is a key frame in every 5fth frame.

1. Open the Environments/Customization/Available Objects window.

2. Go to the Macros tab. Select the 'Macro' button. The lower part of the window shows you now the macro button specific options.

3. Set the 'Language' field to 'RPL'. You can now enter the desired RPL program into the text control. Enter the following program:

 

5  "CurrentProject.Animator.Frame" Get  + 
"CurrentProject.Animator.Frame" Set

 

The first line adds 5 to the current frame. The second line assigns the result back to the current frame.

4. Enter an appropriate name and a tool tip for the button (such as 'Jump 5'). You might also want to paint a nice icon for the button using your favorite painting program. Then select it using the 'Image' browse button of the macro button controls.

5. Drag & drop the macro button icon into the toolbar.

Every time you click the macro button, the animation time is increased by 5 frames.